package main

import "fmt"

type Student struct {
	Id     int
	Name   string
	Author string
}

func main() {
	student1 := Student{
		Id:     1,
		Name:   "go微服务",
		Author: "徐冬成",
	}

	student2 := Student{
		Id:     1,
		Name:   "go微服务",
		Author: "徐冬成",
	}

	fmt.Println(student1 == student2)   // true
	fmt.Println(&student1 == &student2) // false

	// 匿名结构体
	var demo struct {
		a    int
		name string
	}

	demo.a = 100
	demo.name = "xs"
	fmt.Println(demo)

	data := struct {
		key   string
		value string
	}{"abc", "ggg"}
	fmt.Println(data)

}
